package com.ethink.order.service.impl;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ethink.order.api.info.GroupMateDetailInfo;
import com.ethink.order.common.entity.GroupMateDetail;
import com.ethink.order.common.mapper.GroupMateDetailMapper;
import com.ethink.order.converter.GroupMateDetailConverter;
import com.ethink.order.service.GroupMateDetailService;
import com.ethink.order.service.GroupMateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 组套商品明细表 Service接口实现
 *
 * @author default
 * @date 2023-02-22
 */
@Slf4j
@Service
public class GroupMateDetailServiceImpl extends ServiceImpl<GroupMateDetailMapper, GroupMateDetail> implements GroupMateDetailService {

    @Autowired
    private GroupMateDetailMapper groupMateDetailMapper;

    @Autowired
    private GroupMateDetailConverter groupMateDetailConverter;


    @Override
    public List<GroupMateDetailInfo> listGroupMateDetail(Long groupMateId) {
        return groupMateDetailMapper.listGroupMateDetail(groupMateId);
    }

    /**
     * 查询明细信息
     *
     * @param groupMateId
     * @return
     */
    @Override
    public List<GroupMateDetailInfo> listByGroupMateId(Long groupMateId) {
        return groupMateDetailMapper.listByGroupMateId(groupMateId);
    }

}
